import { createRouter, createWebHashHistory } from "vue-router";
import LayoutIndex from '@renderer/layout/Index.vue'

const routes = [
  {
    path:'/',
    component:LayoutIndex,
    name:'LayoutIndex',
    redirect:'/home',
    meta:{
      title:'首页'
    },
    children:[
      {
        path:'home',
        component:()=>import('@renderer/views/Home.vue'),
        name:"Home",
        meta:{
          title:'首页'
        },
      },
      {
        path:'dealerList',
        component:()=>import('@renderer/views/DealerList.vue'),
        name:"DealerList",
        meta:{
          title:'经销商列表'
        },
      },
      {
        path:'dealerLevel',
        component:()=>import('@renderer/views/DealerLevel.vue'),
        name:"DealerLevel",
        meta:{
          title:'经销商等级'
        },
      },
      {
        path:'achievementDetail',
        component:()=>import('@renderer/views/AchievementDetail.vue'),
        name:"AchievementDetail",
        meta:{
          title:'业绩详情列表'
        },
      },
      {
        path:'dividendRate',
        component:()=>import('@renderer/views/DividendRate.vue'),
        name:"DividendRate",
        meta:{
          title:'分红比例配置'
        },
      },
      {
        path:'dividendList',
        component:()=>import('@renderer/views/DividendList.vue'),
        name:"DividendList",
        meta:{
          title:'分红列表'
        },
      },
      {
        path:'operateRecord',
        component:()=>import('@renderer/views/OperateRecord.vue'),
        name:"OperateRecord",
        meta:{
          title:'操作日志'
        },
      },
      {
        path:'systemSet',
        component:()=>import('@renderer/views/SystemSet.vue'),
        name:"SystemSet",
        meta:{
          title:'系统设置'
        },
      }
    ]
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});


export default router;
